home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.compilers / comp.sys.amiga.programmer_5235_000018.msg < prev    next >
Encoding:
Text File  |  1994-11-27  |  3.3 KB  |  86 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: dd.chalmers.se!news.chalmers.se!sunic!pipex!howland.reston.ans.net!gatech!concert!sas!mozart.unx.sas.com!jamie
  3. From: jamie@cdevil.unx.sas.com (James Cooper)
  4. Subject: Re: SAS Keywords (__saveds etc)
  5. Originator: jamie@cdevil.unx.sas.com
  6. Sender: news@unx.sas.com (Noter of Newsworthy Events)
  7. Message-ID: <CKCG1B.Lzq@unx.sas.com>
  8. Date: Fri, 28 Jan 1994 14:24:45 GMT
  9. References:  <inf01.759746947@apollo23>
  10. Nntp-Posting-Host: cdevil.unx.sas.com
  11. Organization: SAS Institute Inc.
  12. Lines: 72
  13.  
  14.  
  15. In article <inf01.759746947@apollo23>, inf01@apollo23.uni-trier.de (Hans-Joerg Frieden) writes:
  16. >I recently had some difficulties porting some source from SAS to Aztec. The
  17. >problem arises with all those SAS keywords. Can someone post a list or explain
  18. >what the following keywords are meant to be?
  19. >a) __saveds
  20. >   I guess this is the same as doing a geta4() (right)?
  21.  
  22. Correct.  We also support using geta4(), but it is easier to tell
  23. directly from a prototype that this will happen if you use the keyword
  24. instead.
  25.  
  26. >b) __asm
  27. >   I have no clue for this one, except that it might have something
  28. >   to do with register allocation.
  29.  
  30. Yes.  This tells the compiler that this function takes parameters in
  31. specific registers.
  32.  
  33. >c) __register
  34. >   I think this is to force a parameter into a register for library
  35. >   calls.
  36.  
  37. *Must* be used with __asm (mentioed above); it specifies the register a
  38. parameter will arrive in when the function in called.
  39.  
  40.         int __asm foo(register __a3 char *bar);
  41.  
  42. This says that function "foo" will receive its only parameter in register
  43. A3, rather than the default for pointers of A0.
  44.  
  45. >d) everythink I forgot.
  46.  
  47. __aligned       -       force a particular item to be LONGWORD aligned
  48. __chip          -       force a particular item to load directly to CHIP
  49. __near          -       force a data item into the NEAR data section
  50. __far           -       force a data item into the FAR data section
  51. __interrupt     -       similar to adding int_start()/int_end()
  52. __regargs       -       force a function to take parameters in registers,
  53.                         rather than on the stack
  54. __stdargs       -       force a function to take parameters from the
  55.                         stack, rather than in registers
  56. __inline        -       tells the optimizer to put the code for this
  57.                         function inline wherever it is called, rather
  58.                         than generating a function call
  59.  
  60. >Why aren't those things done via #pragma's, this would make porting
  61. >much easier (sigh).
  62.  
  63. We do supply alternatives to a few of the keywords, but it is usually a
  64. lot easier to just use 'em directly (when you need one, of course!).
  65.  
  66. >I hope someone can help me out.
  67.  
  68. (Blatant favoritism alert! :-)
  69.  
  70. Well, my best recommendation is (of course), to upgrade to SAS/C.  :-)
  71.  
  72. In the latest version of our compiler, we support most "MANXisms"
  73. directly, such as #pragma amicall, etc.  We even have utilities so you
  74. can use the same command line switches you are used to, but drive our
  75. compiler instead.
  76.  
  77. -- 
  78. ---------------
  79. Jim Cooper
  80. (jamie@unx.sas.com)                             bix: jcooper
  81.  
  82. Any opinions expressed herein are mine (Mine, all mine!  Ha, ha, ha!),
  83. and not necessarily those of my employer.
  84.  
  85. Remember, "Euphemisms are for the differently brained."
  86.